home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 3340 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.9 KB

  1. From: magicsn@birdland.es.bawue.de (Steffen Haeuser)
  2. Path: eisbaer.bb.bawue.de!birdland.es.bawue.de
  3. Newsgroups: comp.sys.amiga.programmer
  4. Message-ID: <90000505713225420432@BIRDLAND>
  5. References: <4f7fqi$c0v@news.kth.se>
  6. X-Mailer: fastnet2rfc V2.0 - (tse) Lunqual%MAB@wsb.freinet.de / Tachy@wsb.freinet.de
  7. Organization: Birdland BBS, Dettingen/Teck, South Germany
  8. Content-Type: text/plain; charset=ISO-8859-1
  9. Subject: CyberGFX programming, help!
  10. Date: 08 Feb 1996 12:42:22
  11.  
  12.  
  13.  d92-jfo%nada.kth.se@INTERNET wrote : 
  14.  
  15. >
  16. > I have recently begun programming CyberGFX, and have a few problems...
  17. >
  18. > 1) How do you actually create a 'CyberMap' yourself?
  19. >    Do you simply AllocBitMap with depth > 8?
  20.  
  21. You do not create a CyberMap. You open a Screen, and get the Map with the
  22. Screen. If you need more Maps (Maps that won't be displayed, for DBuffering
  23. and stuff...), then you open a double Height or Triple Height Screen...
  24.  
  25. > 2) How do you perform a alpha-channeled blit?
  26.  
  27. Oops... don't know... but blitting is done with BltBitmap and that stuff...
  28. will be patched to use the GFX Board Blitter... maybe it will automatically use
  29. Alpha Channel too, maybe not, i do not know...
  30.  
  31. > 3) Is there no way to use unused gfx memory to store fi. bobs?
  32. >    It would be great if you could pass a ABM_CARDMEMORY to AllocBitMap...
  33.  
  34. The only way i found out to do so is : Allocating a double/triple/... height
  35. Screen. Triple height works, quadruple height, i think too, but somewhere
  36. beyond (for 640x480) maybe CyberGraphX does not want SUCH oversized screens
  37. anymore... did'nt try it for more than Quadruple height...
  38.  
  39. > 4) Isn't ScaleRegion whatever supposed to... well, scale?
  40. >    When I use it, the data just gets copied straight through?
  41.  
  42. Hmmm, no idea...
  43.  
  44. Steffen Haeuser
  45.  
  46. BTW : Do not access the Bitmap through the Bitmap structure...
  47.  
  48. instead...
  49.  
  50. Use DoCMethodTagList and a Hook to get the address of the Video RAM base
  51. address...
  52.  
  53. Example Hook : (out of my Source of rtgmaster.library...)
  54.  
  55.  movem.l d0-d6,-(sp)
  56.         move.l (a1),d7 ; Address
  57.         move.l 4(a1),d1 ; X-Offset
  58.         move.l 8(a1),d2 ; Y-Offset
  59.         clr.l d3
  60.         clr.l d4
  61.         move.w 20(a1),d3 ; BytesPerRow
  62.         move.w 22(a1),d4 ; BytesPerPixel
  63.         clr.l d6
  64.         mulu d4,d1
  65.         add.l d1,d6
  66.         mulu d2,d3
  67.         add.l d3,d6
  68.         ror.l #2,d6
  69.         add.l d6,d7
  70.         movem.l (sp)+,d0-d6
  71.         rts
  72.                     
  73. Will return the base address in d7... that is not quite OK, as 
  74. DoCMethodTagList might CHANGE d7, but with all cybergraphics.library's that 
  75. existed, it did not do so :) And there is not existing an alternative... the 
  76. LockBitmap call in later cybergraphics.library does not work the way
  77.  
  78. LockBitmap
  79. SaveBitmap
  80. Unlock it again
  81. Do your stuff
  82.  
  83. and it is not alowed to do
  84. LockBitmap
  85. Do a LOT of stuff
  86. Unlock
  87. (no Library calls are allowed inside the lock)
  88.  
  89. So we HAVE to do it with this Hook :)
  90.  
  91. Steffen Haeuser
  92.